<template>
    <div class="home_container">
            <div class="sectionHeaderContainer">{{item.header}}</div>
            <!-- 折叠 -->
            <accordion
            v-for="(item, index) in item.sectionItemConfig"
            :key="index"
            :item="item"
            :list="item.child"
            :selectIndexPath="selectIndexPath"
            :selfIndexPath={section:sectionIndex,row:index}
            @updateSelectIndex="handleUpdateSelectIndex"
            >
            </accordion>
        </div>
</template>


<script>

import Accordion from "./dsbridgePluginItemCell.vue"

export default {

   data() {
       return {
        selectSectionIndex: -1,
       }
   },
  props: {
    item: {
      type: Object,
      default() {
        return {};
      },
    },
    sectionIndex: Number ,
    selectIndexPath : {
    type: Object,
      default() {
        return {};
      },
    },

    dataLists : {
        type : Array,
        default() {
            return [];
        }
    }
  },
   components:{
       Accordion
   },

  methods:{
        handleUpdateSelectIndex(indexPath) {
            // 通知上层非目标选中关闭expand状态
            this.$emit("updateSelectIndex", indexPath);
        }
  }


}
</script>


<style lang="less">
.home_container {
  display: flex;
  flex-direction: column;
  width: 100vw;
}

.sectionHeaderContainer{
  display: flex;
  margin-top: 20px;
  font-size: 18px;
  font-weight: 800;
  margin-left: 1em;
  margin-right: 1em;
}
</style>